﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace University.Workshop.Presenters.WaterPurchase
{
    public class PresenterSecondStepForModifyWaterPurchase
    {
        private ISecondStepForModifyWaterPurchase view;

        public PresenterSecondStepForModifyWaterPurchase (ISecondStepForModifyWaterPurchase view)
        {
            this.view = view;
        }

        public void UpdateData()
        {
            view.Amount = view.WaterPurchaseToModify.Amount;
            view.Courtesy = view.WaterPurchaseToModify.Courtesy;
            view.DatePurchase = view.WaterPurchaseToModify.DatePurchase;
            view.TotalPrice = view.WaterPurchaseToModify.TotalPrice;
            view.DateRegistry = view.WaterPurchaseToModify.DateRegistry;
        }

        public void ChargeDataUser()
        {
            view.WaterPurchaseToModify.Amount = view.Amount;
            view.WaterPurchaseToModify.Courtesy = view.Courtesy;
            view.WaterPurchaseToModify.DatePurchase = view.DatePurchase;
            view.WaterPurchaseToModify.TotalPrice = view.TotalPrice;
        }
    }
}
